package router

import (
	"github.com/gin-gonic/gin"
	"lin6xcom/src/controller"
	"lin6xcom/src/utils"
)

// 文件相关路由
func fileRouter(e *gin.Engine) {
	e.Static("/file", "./src/static")
	uploadRouter := e.Group("/file")
	{
		uploadRouter.POST("upload", utils.FJwt{}.Getting, controller.FileController{}.Upload)
		uploadRouter.DELETE("delete", utils.FJwt{}.Getting, controller.FileController{}.Delete)
		//uploadRouter.OPTIONS("upload", func(ctx *gin.Context) {
		//	ctx.Next()
		//})
	}
}
